public NoticeBean getNoticeById(int noticeID) {
    Connection conn = DBConn.getConn();
    NoticeBean noticeBean = new NoticeBean();
    try {
        String sql = "select * from notice where NoticeID=?";
        PreparedStatement pmst = conn.prepareStatement(sql);
        pmst.setInt(1,noticeID);
        ResultSet rs = pmst.executeQuery();
        if (rs.next()){
            noticeBean.setNoticeID(rs.getInt(1));
            noticeBean.setNoticeTitle(rs.getString(2));
            noticeBean.setNoticeContent(rs.getString(3));
            noticeBean.setNoticeTime(rs.getString(4));
            noticeBean.setAdminName(rs.getString(5));
            return noticeBean;
        }
    } catch (SQLException e) {
        throw new RuntimeException(e);
    }
    return null;
}
